package com.hyt.it.ogt.ykcj.common.enums;

/**
 * 发布类型枚举
 *
 * @author liying
 */
public enum PublishTypeEnums {

    PUBLISH_TYPE_0(0, "成绩显示"),
    PUBLISH_TYPE_1(1, "允许查看试卷"),
    PUBLISH_TYPE_2(2, "成绩复核申请"),
    ZS_DOWNLOAD_TYPE_3(3, "证书下载"),
    ;
    private Integer code;
    private String desc;

    PublishTypeEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static PublishTypeEnums getAnalysisByCode(Integer code) {
        for (PublishTypeEnums analysisType : PublishTypeEnums.values()) {
            if (analysisType.getCode().equals(code)) {
                return analysisType;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }


    public String getDesc() {
        return desc;
    }
}
